import React from "react"
import TabBar from "@/components/tabBar"
import styles from "./index.module.less"
import { Button } from "antd"
import {useStores, observer} from "../../../utils/mobx";

const Home = () => {
    const { homeStore } = useStores()
    const { setCount, count, name } = homeStore
    console.log(homeStore)

    const login = async () => {
      const params = {
        username: "王朝",
        password: 123456
      }
      await homeStore.login(params)
    }

    return (
        <div className={styles.home}>
            Home   {count} { name }
            <Button onClick={login}>Click</Button>
            <TabBar />
        </div>
    )

}

export default observer(Home);
